#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
# @Time: 2023/10/8 14:09
# @Author: Anthony (anthony66888@163.com)
# @description: 
"""
import functools
import math
import threading
import time


# roll_high = 40
# roll_low = 1
#
# reward_rate = 0.83
# quantity_init = 1012.50 * (roll_high - roll_low) / 100 / reward_rate
# # 使用 math.ceil() 向上取整并保留两位小数
# quantity = math.ceil(quantity_init * 100) / 100
# print(quantity)


def demo_thread(thread):
    i = 0
    while True:
        i += 1
        print(f"这是第{i}次执行{thread}线程")
        time.sleep(2)
        if i == 15:
            break


t1 = threading.Thread(target=lambda: demo_thread("t1"))
t2 = threading.Thread(target=lambda: demo_thread("t2"))

# t1 = threading.Thread(target=functools.partial(demo_thread, "t1"))
# t2 = threading.Thread(target=functools.partial(demo_thread, "t2"))

t1.start()
t2.start()

t1.join()
t2.join()


